/*
 * $Id: Condition.h,v 1.3 2005-12-15 07:13:30 bacon Exp $
 */

#ifndef _XPP_BAS_CONDITION_CLASS_
#define _XPP_BAS_CONDITION_CLASS_

#include <xpp/Uncopyable.h>
#include <xpp/Exception.h>
#include <xpp/bas/Mutex.h>
#include <xp/bas/cond.h>

namespace xpp
{
	namespace bas
	{

		class Condition: public xp_cond_t, public Uncopyable
		{
		public:
			Condition ();
			~Condition ();
		
			void signal ();
			void broadcast ();

			void wait (const Mutex& mutex);
			void wait (const Mutex& mutex, xp_time_t timeout);
		};
		
		XPP_EXCEPTION (ConditionException);
		
	}
}
#endif
